-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New feature #26
New feature #26
Conversation
Syntax Highlighting and Automatic retractable according to container size? |
Yes. We do have highlighting to some point though.. |
I also felt this is good My English is not good |
I'll review this next week. Meanwhile please make this configurable and turned off by default. Thank you! |
@@ -49,7 +49,7 @@ <h1 class="text-muted"><json-formatter></h1> | |||
<p>Use <code><json-formatter></code> directive</p> | |||
<p> | |||
<pre> | |||
<json-formatter open="1" json="{my: 'json'}"></json-formatter> | |||
<json-formatter open="1" json="{my: 'json'}" thumbnail="1"></json-formatter> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a "provider" for this configuration. This is something users will set per app.
See an example of exposing a provider here https://github.com/mohsen1/angular-json-schema-form/blob/master/src/schema-form.js#L103
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
i want to learn ‘provider’
I've added a bunch of comments. Some of them are on mine own mistakes (like not using The thumbnail configuration should be in app level using a config provider. I've given you an example for that. People usually use or don't use this feature per app or controller. Don't worry about naming too much. I can do a pass and rename all of stuff at once. Thanks! |
thanks for your advice. |
I've fixed some issues,please review. |
@@ -57,7 +57,7 @@ <h1 class="text-muted"><json-formatter></h1> | |||
<h4>Demo</h4> | |||
<div class="tests"> | |||
<div class="result dark"> | |||
<json-formatter json="complex" open="1" class="json-formatter-dark"></json-formatter> | |||
<json-formatter json="complex" open="1" class="json-formatter-dark" thumbnail="1"></json-formatter> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be here anymore.
Thank you ! |
Could you please rebase into one commit? |
Hover over a row, show this object's code thumbnail remove unreferenced attribute compile new dist more useful Thumbnail information like Chrome Developer Tools Remove json key double quotes configurable of thumbnail default is turned off update demo.html thumbnail -> provider config provider enable thumbnail in demo Simplify test case deal with other issues demo.html thumbnail default is disabled json-formatter.js parseInt add radix value setEnabled -> .enabled (use setter)
This is now released |
( ゜- ゜)つロ cheers~ |
Hover over a row, show this object's code thumbnail